package com.syni.mdd.sjb.tool.serialize;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.syni.mdd.sjb.common.component.utils.common.utils.StringUtils;

import java.io.IOException;

public class VersionSerialize extends JsonSerializer<String>{
    @Override
    public void serialize(String s, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        if(StringUtils.isNotBlank(s)){
            jsonGenerator.writeString(s);
        }
    }
}
